<?php

class Requirer {

    public static function getRootPath() {
		$pacote = "classes/util";
		$pathToThis = pathinfo(__FILE__);
		
		return substr($pathToThis['dirname'], 0, strlen($pathToThis['dirname']) - strlen($pacote) - 1);
    }
    
    public static function dynamicRequireOnce($class) {
    	require_once Requirer::getRootPath() . $class.".class.php"; 
    	//print_r ( Requirer::getRootPath() . $class.".class.php" );
    }
}
?>